Gomoku game start page

c#을 이용해서 클라이언트 부분을 제작하고 C++을 통해서 서버 부분을 개발한다.
windows forms로 하나의 프로젝트를 제작
MenuForm.cs
기본적인 틀은 모두 도구 상자와 속성을 이용해서 구현;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Client
{
public partial class MenuForm : Form
{
public MenuForm()
{
InitializeComponent();
}
private void singlePlayButton_Click(object sender, EventArgs e)
{
Hide();
SinglePlayForm singlePlayForm = new SinglePlayForm();
singlePlayForm.FormClosed += new FormClosedEventHandler(childForm_Closed);
singlePlayForm.Show();
}
private void exitButton_Click(object sender, EventArgs e)
{
System.Windows.Forms.Application.Exit();
}
void childForm_Closed(object sender, FormClosedEventArgs e)
{
Show();
}
private void MenuForm_Load(object sender, EventArgs e)
{
}
}
}
MenuForm.Designer.cs
namespace Client
{
partial class MenuForm
{
/// <summary>
/// 필수 디자이너 변수입니다.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 사용 중인 모든 리소스를 정리합니다.
/// </summary>
/// <param name="disposing">관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form 디자이너에서 생성한 코드
/// <summary>
/// 디자이너 지원에 필요한 메서드입니다.
/// 이 메서드의 내용을 코드 편집기로 수정하지 마세요.
/// </summary>
private void InitializeComponent()
{
this.singlePlayButton = new System.Windows.Forms.Button();
this.exitButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// singlePlayButton
//
this.singlePlayButton.Location = new System.Drawing.Point(245, 101);
this.singlePlayButton.Name = "singlePlayButton";
this.singlePlayButton.Size = new System.Drawing.Size(100, 40);
this.singlePlayButton.TabIndex = 0;
this.singlePlayButton.Text = "혼자하기";
this.singlePlayButton.UseVisualStyleBackColor = true;
this.singlePlayButton.Click += new System.EventHandler(this.singlePlayButton_Click);
//
// exitButton
//
this.exitButton.Location = new System.Drawing.Point(245, 203);
this.exitButton.Name = "exitButton";
this.exitButton.Size = new System.Drawing.Size(100, 40);
this.exitButton.TabIndex = 1;
this.exitButton.Text = "종료하기";
this.exitButton.UseVisualStyleBackColor = true;
this.exitButton.Click += new System.EventHandler(this.exitButton_Click);
//
// MenuForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(584, 361);
this.Controls.Add(this.exitButton);
this.Controls.Add(this.singlePlayButton);
this.Name = "MenuForm";
this.Text = "Form1";
this.Load += new System.EventHandler(this.MenuForm_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button singlePlayButton;
private System.Windows.Forms.Button exitButton;
}
}
Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Client
{
static class Program
{
/// <summary>
/// 해당 애플리케이션의 주 진입점입니다.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MenuForm());
}
}
}
SinglePlayForm.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Client
{
public partial class SinglePlayForm : Form
{
public SinglePlayForm()
{
InitializeComponent();
}
private void SinglePlayForm_Load(object sender, EventArgs e)
{
}
}
}